package org.jeecg.modules.middleware.rabbitmq.gen.handler.impl;

import org.jeecg.modules.middleware.rabbitmq.gen.EnumGenHandler;
import org.jeecg.modules.middleware.rabbitmq.gen.handler.IGenMqHandle;
import org.jeecg.modules.wlhy.shipping.service.IHyShippingNoteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class TestHandler implements IGenMqHandle {
    @Autowired
    private IHyShippingNoteService hyShippingNoteService;

    @Override
    public String getHandlerName() {
        return EnumGenHandler.TEST_HANDLER.getHandlerName();
    }

    @Override
    @Transactional
    public void handle(String channel , String msg) {
//        HyShippingNote shippingNote = hyShippingNoteService.getByIdForUpdate("1507296014535495682");
        System.out.println(msg);
    }
}
